const express = require("express");
const app = express();
// 引入自定义中间件
const my = require("./express-middleware2");
// 使用自定义中间件
app.use("/a", my.setHeader());
// 中间件
app.use("/list", (req, res, next) => {
  console.log(req.url);
  next();
});
app.get("/list", (req, res) => {
  res.send("list");
});
app.listen(3000, (req, res) => {
  console.log("yes!!");
});
